#ifndef FORMDRUGITEMS_H
#define FORMDRUGITEMS_H

#include <QWidget>
#include <QSqlQuery>
#include <QSqlQueryModel>

namespace Ui {
class FormDrugItems;
}

class FormDrugItems : public QWidget
{
    Q_OBJECT

public:
    explicit FormDrugItems(QWidget *parent = nullptr);
    ~FormDrugItems();

signals:

    void destroyW(QString);

private slots:
    void closeEvent(QCloseEvent *event);
    void on_pbSave_clicked();
    void on_pbSearch_clicked();
    void on_pbExit_clicked();
    void on_tvAll_doubleClicked(const QModelIndex &index);
    void on_tvCurrent_doubleClicked(const QModelIndex &index);
    void on_lePym_returnPressed();
    void on_pbLED_clicked();
    void resizeEvent(QResizeEvent *event);
    void on_cbbStoreDept_currentIndexChanged(int index);

private:
    Ui::FormDrugItems *ui;
    QSqlQuery * qro;
    QSqlQueryModel *mdCurrent, *mdAll;
    QString spellCode, drugType, selfFlag;
    QString downloadPath;   //生成LED显示屏文件位置
    QString store_depts, current_dept_code;   //库名称与代码
    bool initialize_finished;   //界面初始化标志
};

#endif // FORMDRUGITEMS_H
